package com.shuany.ws.jaxb;

import javax.xml.bind.annotation.adapters.XmlAdapter;

public class AddressAdapter extends XmlAdapter<String, Address> {

    @Override
    public Address unmarshal(String v) throws Exception {
        Address address = new AddressImpl();
        address.setAddress(v);
        return address;
    }

    @Override
    public String marshal(Address v) throws Exception {
        return v.getAddress();
    }

}
